#!/usr/bin/python3
# -*- coding:utf-8 -*-
"""
@author: 
@time: 2024/3/1 7:39 AM
@Function: 获取yaml中的数据信息
"""
import os.path
from typing import Dict, Text
import yaml

from config.setting import FILE_PATH
from utils.load_config import config


def load_yaml_file(yaml_file: Text) -> Dict:
    with open(yaml_file, mode='r', encoding="UTF-8") as fp:
        print(yaml_file)
        yaml_context = yaml.load(fp, Loader=yaml.FullLoader)
        return yaml_context


if __name__ == '__main__':
    # r = config.repository_path
    # res = load_yaml_file(r)
    # print(res)
    print(load_yaml_file(os.path.join(FILE_PATH['yaml_data'],'xbase_login_repository.yaml')))
